package com.campus.server.service;

import com.campus.common.vo.Book;
import com.campus.common.vo.Student;
import com.campus.common.vo.StudentRequest;
import com.campus.server.dao.StudentAccountManagementDao;
import com.campus.server.dao.StudentDao;

import java.util.List;

public class StudentService {

    private StudentDao studentDao=new StudentDao();
    private StudentAccountManagementDao studentAccountManagementDao=new StudentAccountManagementDao();
    public boolean register(String username, String password, Student student) {
        return studentDao.isRegister(username,password,student);
    }
    public boolean addStudentRequest(String studentId,String contactInfo,String oldContactInfo){
        return studentDao.addStudentRequest(studentId,contactInfo,oldContactInfo);
    }
    public boolean deleteStudentRequest(String studentId,String contactInfo){
        return studentDao.deleteStudentRequest(studentId,contactInfo);
    }
    public Student getStudenstById(String studentId) {return studentAccountManagementDao.getStudentById(studentId);}
    public List<StudentRequest> listRequests() {
        return studentDao.listStudentRequests();
    }
    public boolean upDateStudent(String studentId,String contactInfo){
        return studentDao.updateStudent(studentId,contactInfo);
    }
}
